<?php if (! defined('BASEPATH') ) die("No direct script access allowed.");


	/**
	 * $APP_PATH/system/models/Theme_model.php
	 * 
	 * Provides access to a database, for theme information.
	 * 
	 * @author 	Mark Skilbeck, Mahcuz.com, 2009.
	 * @link	http://blog.mahcuz.com, http://mahcuz.com, http://code.mahcuz.com
	 * @package PHP Project Tracker
	 */
	 
	 class Theme_model extends Model {
	 	
	 	public function Theme_model() {
			 parent::Model();
	 	}
	 	
	 	public function get_current_theme($theme_type) {
	 		$this->db
	 			 ->from('themes')
			 	 ->where('theme_type', $theme_type);
	 		$query = $this->db->get();
	 		
	 		if ($query->num_rows() !== 1) {
	 			show_error('Theme error: multiple or 0 themes returned for theme type <code>' . $theme_type);
	 		}
	 		
	 		return $query->row();
	 	}
	 }


?>